import 'package:school_assistant/generated/json/base/json_field.dart';
import 'package:school_assistant/generated/json/article_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class ArticleEntity {
  int? ty;
  String? user;
  String? title;
  String? body;
  int? like;
  String? image;
  String? extra;
  String? id;

  ArticleEntity();

  factory ArticleEntity.fromJson(Map<String, dynamic> json) =>
      $ArticleEntityFromJson(json);

  Map<String, dynamic> toJson() => $ArticleEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
